package com.firebird.app.kotlin.stock

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter


class TabAdapter(fm: FragmentManager?, private val list: List<String>, list1: List<Fragment>) : FragmentPagerAdapter(fm) {
    private var mListFragment: List<Fragment>?=null
    override fun getItem(position: Int): Fragment {
        return mListFragment!![position]
    }

    override fun getCount(): Int {
        return mListFragment!!.size
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return list[position]
    }

    override fun getItemPosition(`object`: Any): Int {
        return super.getItemPosition(`object`)
    }

    init {
        this.mListFragment = list1
    }
}